home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
misc
/
dr.str
/
PG Info
< prev
next >
Wrap
Text File
|
1992-10-05
|
5KB
|
111 lines
*** Notes on the 68HC11 Power Glove project - 1/14/91
(edited by Jim Speth 10/5/92)
This code is designed for both the 68HC11EVB board from Motorola, and a
standalone board that I have enclosed the schematics for.
How to get it working
---------------------
* Using the 68HC11EVB
- Make a cable from the power glove to the EVB. The pin numbers on the EVB
side refer to the 60 pin expansion connector on the EVB. (I'm not sure
these are the same pin numbers on the EVB-U's connector, however.)
+-------------------------- GND (pin 1)
|+------------------------- PA4 - PG Clock (pin 30)
||+------------------------ PA5 - PG Latch (pin 29)
|||+----------------------- PA0 - PG Data (pin 34)
||||
-----+
Connector \oooo|
on PG box \ooo|
---+
|
+------------------------- +5V (pin 26)
- Connect the EVB terminal port to a serial port on your PC (or whatever
you have).
- With everything now connected, download the file pg.s19 into the onboard
RAM following the directions in the EVB manual.
- From the BUFFALO monitor prompt, type "g d800" to start the program. The
glove should beep one or two times, and then the lights on the sensor
array should begin to flicker.
- If you only have one of the serial ports on the EVB connected to your
machine, switch the cable to the other (host) port on the EVB. If you
have both connected, make sure you're monitoring the other serial port
now.
- The EVB is now sending data from its host port (not the terminal port!)
to your serial port at 9600 baud.
- Since the program is being stored in RAM, you must go through the loading
procedure every time you turn on the EVB.
* Using the standalone board
- Build the standalone board described in the schematic file "pg.gif".
Please note that the pin numbers on the CPU refer to the 48 pin DIP
version of the 68HC811E2, not the PLCC one.
- Close the jumper on the standalone board to activate bootstrap mode.
Connect the serial port on the board to a serial port on your machine.
Power up the board.
- Run Dr. StrangeGlove, choose the command to send an S-record to the board.
This command sends the program code to the EEPROM in the 68HC811 chip.
You could optionally use another utility to load the EEPROM, such as
PROG11.
- Power down the board, remove the jumper, connect the power glove to it,
and power up the board. The glove should beep one or two times, and then
the lights on the sensor array should begin to flicker.
- The board is now sending data from its serial port to your serial port
at 9600 baud.
- Since the program is stored in EEPROM, this only needs to be done once.
Every time you turn it on (after the first), the board will begin
executing the Power Glove interface code. Make sure the jumper is no
longer shorted!
Notes on pg.asm
---------------
The Power Glove interface code is designed to take the dirty work out of talking
to the Power Glove. The host computer sends single character commands, and the
interface board sends back the raw data from the Power Glove. The format is
almost exactly the same as the actual glove data itself:
0xA0 (flag only sent in continuous data mode)
X (single byte position -127..127)
Y "
Z "
rot (single byte 0..11 in 30 degree increments)
fingers (packed byte containing two bits for each of four fingers)
keys (single byte of keypress data)
In continuous mode (the default), the seven byte packet is sent over and over
again, with the 0xA0 flag indicating the start of the data. In request mode,
the board only sends data when prompted to, and then only sends the last six
bytes of the packet. Also, there is a user selectable deglitching mode that
filters out some of the noise in the X and Y directions (thanks to Dave Stampe
for that code!). Only the hysterisis deglitching routine is used, due to the
fact that I couldn't get the other routine to work correctly! The commands used
to talk to the board are the following:
C Start continuous data mode (default)
R Start request data mode
? Request a data packet when in request mode
+ Turn on hysterisis deglitching mode (default)
- Turn off hysterisis deglitching mode
Note: At the present time, the serial port interface is fixed at 9600 baud.